home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Devices and Hardware / Display Manager / DisplayVideo / DisplayVideo.h < prev    next >
Encoding:
Text File  |  2000-09-28  |  2.7 KB  |  62 lines  |  [TEXT/CWIE]

  1. /*
  2.     File:        DisplayVideo.h
  3.     
  4.     Description:DisplayVideo will display all info about all video modes supported
  5.                 by each installed video card with their attached monitor. The purpose
  6.                 of this code is to provide a sample of how developers can discover the
  7.                 bit depths and timings of multisync displays.
  8.  
  9.     Author:        EWA
  10.     Copyright:     Copyright: © 1995-1999 by Apple Computer, Inc.
  11.                 all rights reserved.
  12.     
  13.     Disclaimer:    You may incorporate this sample code into your applications without
  14.                 restriction, though the sample code has been provided "AS IS" and the
  15.                 responsibility for its operation is 100% yours.  However, what you are
  16.                 not permitted to do is to redistribute the source as "DSC Sample Code"
  17.                 after having made changes. If you're going to re-distribute the source,
  18.                 we require that you make it clear in the source that the code was
  19.                 descended from Apple Sample Code, but that you've made changes.
  20.     
  21.     Change History (most recent first):
  22.                 6/24/99    Updated for Metrowerks Codewarror Pro 2.1(KG)
  23.                 5/24/95    New today(EWA)
  24.  
  25. */
  26.  
  27.  
  28. // requestFlags bit values in VideoRequestRec (example use: 1<<kAbsoluteRequestBit)
  29. enum {
  30.     kBitDepthPriorityBit        = 0,    // Bit depth setting has priority over resolution
  31.     kAbsoluteRequestBit            = 1,    // Available setting must match request
  32.     kShallowDepthBit            = 2,    // Match bit depth less than or equal to request
  33.     kMaximizeResBit                = 3,    // Match screen resolution greater than or equal to request
  34.     kAllValidModesBit            = 4        // Match display with valid timing modes (may include modes which are not marked as safe)
  35. };
  36.  
  37. // availFlags bit values in VideoRequestRec (example use: 1<<kModeValidNotSafeBit)
  38. enum {
  39.     kModeValidNotSafeBit        = 0        //  Available timing mode is valid but not safe (requires user confirmation of switch)
  40. };
  41.  
  42. // video request structure
  43. struct VideoRequestRec    {
  44.     GDHandle        screenDevice;        // <in/out>    nil will force search of best device, otherwise search this device only
  45.     short            reqBitDepth;        // <in>        requested bit depth
  46.     short            availBitDepth;        // <out>    available bit depth
  47.     unsigned long    reqHorizontal;        // <in>        requested horizontal resolution
  48.     unsigned long    reqVertical;        // <in>        requested vertical resolution
  49.     unsigned long    availHorizontal;    // <out>    available horizontal resolution
  50.     unsigned long    availVertical;        // <out>    available vertical resolution
  51.     unsigned long    requestFlags;        // <in>        request flags
  52.     unsigned long    availFlags;            // <out>    available mode flags
  53.     unsigned long    displayMode;        // <out>    mode used to set the screen resolution
  54.     unsigned long    depthMode;            // <out>    mode used to set the depth
  55.     VDSwitchInfoRec    switchInfo;            // <out>    DM2.0 uses this rather than displayMode/depthMode combo
  56. };
  57. typedef struct VideoRequestRec VideoRequestRec;
  58. typedef struct VideoRequestRec *VideoRequestRecPtr;
  59.  
  60. // Routine defines
  61.  
  62.